<template>
  <div>
    <!-- 角色管理 -->
    <el-card>
      <div slot="header">
        <el-button size="mini" type="primary" >新增角色</el-button>
      </div>

        <el-table
          :data="list"
          border
          stripe
          style="width: 100%">
          <el-table-column
            type="index"
            label="#"
            width="50">
          </el-table-column>

          <el-table-column
            prop="roleName"
            label="角色名称"
            width="200">
          </el-table-column>

          <el-table-column
            prop="roleCode"
            label="角色编码"
            width="240">
          </el-table-column>

          <el-table-column
            prop="remark"
            label="备注"
            width="500">
          </el-table-column>

          <el-table-column
            prop="createTime"
            label="添加时间"
            width="270">
          </el-table-column>

          <el-table-column
            label="操作"
            width="350">
            <template slot-scope="scope">
              <el-button type="success" size="small">编辑</el-button>
              <el-button size="small">删除</el-button>
            </template>
          </el-table-column>

        </el-table>

    </el-card>
  </div>
</template>

<script>
import {findRolesByPage} from '@/api/authority/role';
import mixin from '@/mixins/index';
export default {
  mixins:[mixin],
  data(){
    return{
      //获取角色分页列表
      list:[],
    }
  },
  created(){
    this.getData()
  },
  methods:{
    //获取角色分页列表
    getData(){
      findRolesByPage(this.page.currentPage,this.page.size).then(res=>{
        // console.log(res)
        this.list=res.data.rows
      })
    }
  }
}
</script>

<style lang="scss" scoped>

</style>